﻿<%@ Page Language="C#" MasterPageFile="~/Admin/SiteAdmin.Master" AutoEventWireup="true" CodeBehind="ThemMoiSanPham.aspx.cs" Inherits="DM.Web.Admin.QuanLySanPham.ThemMoiSanPham" Title="Công ty cổ phần Đường Man - Duong Malt JSC" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1><asp:Label ID="lbTieuDe" runat="server"></asp:Label></h1>
    <table width="100%">
        <tr>
            <td style="width:20%"><b>Ngôn ngữ</b></td>
            <td style="width:30%">
                <asp:DropDownList ID = "DropDownListNgonNgu" AutoPostBack="true" runat="server" Width="90%">
                    <asp:ListItem Text="Tiếng Việt" Value="1"></asp:ListItem>
                    <asp:ListItem Text="Tiếng Anh" Value="1"></asp:ListItem>
                </asp:DropDownList>
            </td>
            <td style="width:20%"><b>Ưu tiên</b></td>
            <td style="width:30%"><asp:CheckBox ID="CheckBoxUuTien" runat="server" /></td>
        </tr>
        <tr>
            <td style="width:20%">
            <b>Tiêu đề</b>
            <asp:RequiredFieldValidator ID="RequiredFieldValidatorTieuDe" runat="server" ControlToValidate="TextBoxTieuDe" ErrorMessage=" (Yêu cầu nhập)"></asp:RequiredFieldValidator>
            </td>
            <td colspan = "3"><asp:TextBox ID="TextBoxTieuDe" runat="server" Width="568px"></asp:TextBox></td>    
        </tr>
        <tr>
            <td style="width:20%"><b>Upload ảnh đại diện</b></td>
            <td style="width:30%">
                <asp:FileUpload ID="FileUpload1" Width="90%" runat="server" /></td>
            <td style="width:20%">
                <asp:Button ID="ButtonUpload" runat="server" Width="100px" Text="Upload" OnClick="ButtonUpload_Click" /></td>
            <td style="width:30%"><asp:Label ID="LabelUploadErr" runat="server" Visible="false" Width="90%"></asp:Label></td>
        </tr>
        <tr>
            <td style="width:20%"></td>
            <td colspan="3">
                <asp:Panel ID="PanelAnhDaiDien" runat="server">
                    <asp:DataList ID="DataListAnhDaiDien" runat="server" RepeatColumns="5"  RepeatDirection="Horizontal" OnDeleteCommand="DataListAnhDaiDien_DeleteCommand" >
                        <ItemTemplate>
                            <table width="120">
                                <tr>
                                    <td>
                                        <asp:Image ID="Image1" runat="server" Height="80px" ImageUrl='<%# Bind("link") %>'
                                            Width="120px" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="padding-left:10px">
                                        <asp:Button ID="btnDeletePicture" Width="100px" runat="server" Text="Xóa ảnh" CommandName="Delete"
                                            CssClass="Button" OnClick="btnDeletePicture_Click" />
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:DataList>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td colspan="4"><b>Mô tả (Tóm tắt)</b>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorMoTa" runat="server" ControlToValidate="TextBoxMoTa" ErrorMessage=" (Yêu cầu nhập)"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td colspan="4"><asp:TextBox ID="TextBoxMoTa" runat="server" TextMode="MultiLine" Height="100px" Width="720px"></asp:TextBox></td>
        </tr>
        <tr>
            <td colspan="4"><h1>Nội dung chi tiết</h1></td>
        </tr>
        <tr>
            <td colspan="4">
            <div style="border:1px solid #C0D7DD; width:725px">
            <FCKeditorV2:FCKeditor ID="FCKeditorNoiDung" runat ="server" Width="100%" BasePath="~/fck/" Height="600px" EnableViewState ="true">
            </FCKeditorV2:FCKeditor>
            </div>
            </td>
        </tr>
        <tr>
            <td colspan="4" align="center" style="height: 35px">            
                <asp:Button ID="ButtonSave"  runat="server" Text="Lưu" Width="100px" OnClick="ButtonSave_Click" />            
                <asp:Button ID="ButtonCancal" runat="server" Text="Thoát" Width="100px" style="left: 0px" CausesValidation="False" OnClick="ButtonCancal_Click" />            
            </td>
        </tr>
    </table>
</asp:Content>
